#include <iostream>
using namespace std;

unsigned long int fac(int n)
{
    unsigned long int res = 1;
    if (n != 1)
    {
        res = n * fac(n - 1);
    }
    return res;
}

int main()
{
    int n;
    cin >> n;
    cout << fac(n) << endl;
}